<%@page contentType="text/html; charset=utf-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<%@ include file="/commons/messages.jsp"%>
<%@ include file="/commons/commonEdit.jsp"%>
<%@ include file="/commons/validation.jsp"%>
<%@ include file="/commons/dateTime.jsp"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript" src="${ctx}/scripts/div/common.js"></script>
<script language="JavaScript" type="text/javascript"
	src="${ctx}/scripts/ajaxException.js"></script>
<title>完工验收</title>
<script type="text/javascript">
function reformSubmit(){
    var isTrue=$('reform').fireEvent("onSubmit") ;
    if(isTrue){
	   var param = Form.serialize('reform');
       var url = "${ctx }/renovation_renovateViolationAction.do?method=addReform";
       new Ajax.Request(url,{method: 'post',parameters :param ,onSuccess : function(response){
             ajaxSubmitException(response.responseText);
       		if("true" == response.responseText){
	       		findFrame('reformList').parent.reloadReform();
		        windowClose();
	        }
       }});
    }
}
function setRadioRelation(thiz, relationName){
	if(thiz.value == "002" ){
		Validation.changeElmValidate('remark',"textareatext required max-length-100");
		$(relationName).setAttribute("className","aux_intable_require");
	}else{
		Validation.changeElmValidate('remark',"textareatext max-length-100");
		$(relationName).setAttribute("className","aux_intable_td2");
	}
}
</script>

</head>

<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td class="window_head_outBg">
		<table border="0" cellpadding="0" cellspacing="0">
			<tr>
				<td><img src="${ctx}/images/ico_Advance.gif" width="16"
					height="16" align="absmiddle" /> <span class="window_head_intext">新增完工验收</span></td>
			</tr>
		</table>
		</td>
	</tr>
	<tr>
		<td class="aux_header_line_1"></td>
	</tr>
	<tr>
		<td class="aux_header_line_2"></td>
	</tr>
	<tr>
		<td class="content">
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td valign="top" class="aux_outtable_color">
				<form
					action="${ctx }/renovation_renovateViolationAction.do?method=addReform"
					name="reform" method="post" class="required-validate"><input
					name="renovateViolationId" type="hidden"
					value="${renovate.keyword}">
				<table width="100%" border="0" cellpadding="0" cellspacing="1"
					class="aux_intable_color">
					<tr>
						<td class="aux_intable_td1">房 号：</td>
						<td class="aux_intable_td2">${renovate.houseNumber}</td>
						<td class="aux_intable_td1">业主姓名：</td>
						<td class="aux_intable_td2">${renovate.owner}</td>
					</tr>
					<tr>
						<td class="aux_intable_td1">装修联系人：</td>
						<td class="aux_intable_td2">${renovate.linkMan}</td>
						<td class="aux_intable_td1">联系电话：</td>
						<td class="aux_intable_td2">${renovate.linkManPhone }</td>
					</tr>
					<tr>
						<td class="aux_intable_td1">现场负责人：</td>
						<td class="aux_intable_td2">${renovate.burdenMan }</td>
						<td class="aux_intable_td1">联系电话：</td>
						<td class="aux_intable_td2">${renovate.burdenManPhone }</td>
					</tr>
					<tr>
						<td class="aux_intable_td1">责任部门：</td>
						<td class="aux_intable_td2">${renovate.deptName}</td>
						<td class="aux_intable_td1">装修承建商：</td>
						<td class="aux_intable_td2">${renovate.companyName }</td>
					</tr>
					<tr>
						<td class="aux_intable_td1">违规类别：</td>
						<td class="aux_intable_td2">${renovate.categoryName}</td>
						<td class="aux_intable_td1">整改完成日期：</td>
						<td class="aux_intable_td2">${renovate.completeDate }</td>
					</tr>
					<tr>
						<td class="aux_intable_td1">验收人：</td>
						<td class="aux_intable_require"><input name="checkMan"
							type="text" class="required" value="" size="16" maxlength="36" /></td>
						<td class="aux_intable_td1">验收日期：</td>
						<td class="aux_intable_require">
						<table border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td><input type="hidden" id="lastCheckDate"
									name="lastCheckDate" value="${lastCheckDate }" /> <input
									type="hidden" id="nowDate" name="nowDate" value="${nowDate }" />
								<input name="checkDate" type="text"
									class="inputtext required validate-date-yyyy-MM-dd great-equals-than-lastCheckDate less-equals-than-nowDate"
									validateMessage="输入的验收日期必须大于等于上一次验收时间并且小于等于当前系统时间" value=""
									size="16" afterInsert="birthDateAfter" maxlength="10" /></td>
								<td width="4">&nbsp;</td>
								<td><img id="checkDateButton"
									src="${ctx}/images/ico_clock_month.gif" width="20" height="20" /><span
									id="birthDateAfter"></span></td>
							</tr>
						</table>
						</td>
					</tr>

					<tr>
						<td valign="top" class="aux_intable_td1">状态：</td>
						<td colspan="3" class="aux_intable_require"><input
							name="result" type="radio" value="003"
							class="validate-one-required"
							onClick="setRadioRelation(this,'remarkTip')" /> 已完工 &nbsp;
						&nbsp; &nbsp; &nbsp; &nbsp; <input type="radio" name="result"
							value="002" class="validate-one-required"
							onClick="setRadioRelation(this,'remarkTip')" /> 未完工</td>
					</tr>
					<tbody colspan="4" width="100%" border="0" cellpadding="0"
						cellspacing="1" class="aux_intable_color" id="table01"
						style="display: show">
						<tr>
							<td valign="top" class="aux_intable_td1">备 注：</td>
							<td id="remarkTip" colspan="3" class="aux_intable_td2"><textarea
								name="remark" cols="60" rows="3" class="max-length-100"></textarea></td>
						</tr>
					</tbody>
				</table>
				</form>
				</td>
			</tr>
		</table>
		</td>
	</tr>
	<tr>
		<td class="window_footer">
		<table border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td>
				<table border="0" cellpadding="0" cellspacing="0"
					onclick="reformSubmit();">
					<tr>
						<td class="buttonOffLeft" id="btn1_21"></td>
						<td class="buttonOffMiddle" id="btn1_22"
							onMouseOver="btn_change_over(2)" onMouseOut="btn_change_out(2)"
							onblur="btn_change(2)"><img src="${ctx}/images/ico_ok.gif"
							alt="" width="14" height="14" border="0" align="absbottom" /> 保
						存</td>
						<td class="buttonOffRight" id="btn1_23"></td>
					</tr>
				</table>
				</td>
				<td class="btn_between_space"></td>
				<td>
				<table border="0" cellpadding="0" cellspacing="0">
					<tr>
						<td class="buttonOffLeft" id="btn1_31"></td>
						<td class="buttonOffMiddle" id="btn1_32" onClick="windowClose();"
							onMouseOver="btn_change_over(3)" onMouseOut="btn_change_out(3)"
							onblur="btn_change(3)"><img
							src="${ctx}/images/ico_cancel.gif" alt="" width="14" height="14"
							border="0" align="absbottom" /> 关 闭</td>
						<td class="buttonOffRight" id="btn1_33"></td>
					</tr>
				</table>
				</td>
			</tr>
		</table>
		<p>&nbsp;</p>
		</td>
	</tr>
</table>
</body>
<script type="text/javascript">
              Calendar.setup(
              {
	              inputField : "checkDate", // ID of the input field
	              ifFormat : "%Y-%m-%d", // the date format
	              button : "checkDateButton", // ID of the button
	              align          :    "Tl",           // alignment (defaults to "Bl")
			      singleClick    :    true
              }
              );
</script>
</html>